%{--<!DOCTYPE html>
<html lang="en">

<head>
    <meta name="layout" content="main3"/>
    --}%%{--<g:set var="entityName" value="${message(code: 'opportunity.label', default: 'Opportunity')}"/>
    <title>administratorEdit</title>--}%%{--
</head>

<body class="fixed-navbar fixed-sidebar">--}%
<asset:stylesheet src="homer/vendor/datetimepicker/bootstrap-datepicker3.min.css"/>
<div class="message-box">
    <div class="helpMsg hide"></div>
    <g:if test="${flash.message}">
        <div class="message" role="status">
            ${flash.message}
        </div>
    </g:if>
</div>
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">

            <h2 class="font-light">
                订单号: ${this.opportunity.serialNumber}
            </h2>
            %{--<small>保护期&nbsp;<g:formatDate format="yyyy-MM-dd HH:mm:ss"--}%
                                          %{--date="${this.opportunity?.protectionStartTime}"/> - <g:formatDate--}%
                    %{--format="yyyy-MM-dd HH:mm:ss" date="${this.opportunity?.protectionEndTime}"/></small>--}%
        </div>
    </div>
</div>
<style>
    #rightMessage{
        padding: 10px 40px 16px 40px;
    }
</style>
<div class="animate-panel" id="rightMessage">
    <form  method="PUT" id="myForm1"  >
        <div id="form5">

        </div>
    %{--借款人信息--}%
        <input type="hidden" name="id" value="${this?.opportunity?.id}">
        <div class="row">
            <div class="hpanel hyellow">
                <div class="panel-heading">
                    <div class="panel-tools">
                        <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                    </div>
                    借款人信息
                </div>

                <div class="panel-body form-horizontal">

                    <div class="form-group ">
                        <label class="col-md-2 control-label">姓名</label>

                        <div class="col-md-3">
                            <g:textField class="form-control" name="contact.fullName"
                                         value="${this.opportunity?.contact?.fullName}"/>
                        </div>


                        <label class="col-md-2 control-label">手机号</label>

                        <div class="col-md-3">
                            <g:textField class="form-control" name="contact.cellphone"
                                         value="${this.opportunity?.contact?.cellphone}"/>
                        </div>
                    </div>

                    <div class="form-group ">
                        <label class="col-md-2 control-label">出生日期</label>

                        <div class="col-md-3">
                            <g:textField class="form-control datapicker" name="contact.birthday"
                                         value="${this.opportunity?.contact?.birthday}"/>
                        </div>
                        <label class="col-md-2 control-label">证件类型</label>

                        <div class="col-md-3">
                            <g:select class="form-control" name="contact.identityType"
                                      value="${this.opportunity?.contact?.identityType?.id}"
                                      from="${com.next.ContactIdentityType.list()}" optionKey="id"
                                      optionValue="name"/>
                        </div>
                    </div>

                    <div class="form-group ">

                        <label class="col-md-2 control-label">证件号码</label>

                        <div class="col-md-3">
                            <g:textField class="form-control" name="contact.idNumber"
                                         value="${this.opportunity?.contact?.idNumber}"/>
                        </div>

                        <label class="col-md-2 control-label">婚姻状态</label>

                        <div class="col-md-3">
                            <g:select class="form-control" name="contact.maritalStatus"
                                      value="${this.opportunity?.contact?.maritalStatus}"
                                      from="${["未婚", "已婚", "再婚", "离异", "丧偶"]}"/>
                        </div>
                    </div>

                    <div class="form-group ">
                        <label class="col-md-2 control-label">客户户籍</label>

                        <div class="col-md-3">
                            <g:select class="form-control" name="contact.householdRegistrationType"
                                      id="householdRegistrationType"
                                      from="${com.next.Contact.constrainedProperties.householdRegistrationType.inList}"
                                      value="${this.opportunity?.contact?.householdRegistrationType}"
                                      noSelection="${['': '请选择']}"/>

                        </div>

                        <label class="col-md-2 control-label">户籍所在地</label>

                        <div class="col-md-3">
                            <g:textField class="form-control" name="contact?.nativePlace"
                                         value="${this.opportunity?.contact?.nativePlace}"/>
                        </div>
                    </div>

                    <div class="form-group ">

                        <label class="col-md-2 control-label">性别</label>

                        <div class="col-md-3">
                            <g:textField class="form-control" name="contact.gender"
                                         value="${this.opportunity?.contact?.gender}"/>
                        </div>


                        <label class="col-md-2 control-label">学历</label>

                        <div class="col-md-3">
                            <g:select class="form-control" name="contact.certificate"
                                      value="${this.opportunity?.contact?.certificate?.id}" optionKey="id"
                                      optionValue="name"
                                      from="${com.next.Certificate.list()}"/>
                        </div>
                    </div>

                    <div class="form-group ">
                        <label class="col-md-2 control-label">最高学位</label>

                        <div class="col-md-3">

                            <g:select class="form-control" name="contact.highestCertificate"
                                      value="${this.opportunity?.contact?.highestCertificate?.id}" optionKey="id"
                                      optionValue="name"
                                      from="${com.next.Certificate.list()}"/>
                        </div>

                        <label class="col-md-2 control-label">FAIRS分类</label>

                        <div class="col-md-3">

                            <g:select class="form-control" name="contact.fairsType"
                                      value="${this.opportunity?.contact?.fairsType}"
                                      from="${["美国人", "非美国人", "暂未做FAIRS分类", "其他"]}"/>
                        </div>
                    </div>

                    <div class="form-group ">

                        <label class="col-md-2 control-label">行业类型</label>

                        <div class="col-md-3">
                            <g:textField class="form-control" name="contact.industry?.name"
                                         value="${this.opportunity?.contact?.industry?.name}"/>
                        </div>


                        <label class="col-md-2 control-label">现单位工作年限（年）</label>

                        <div class="col-md-3">
                            <g:textField class="form-control" name="contact.currentSeniority"
                                         value="${this.opportunity?.contact?.currentSeniority}"/>
                        </div>
                    </div>

                    <div class="form-group ">
                        <label class="col-md-2 control-label">职位等级</label>

                        <div class="col-md-3">
                            <g:textField class="form-control" name="contact.jobLevel"
                                         value="${this.opportunity?.contact?.jobLevel}"/>
                        </div>


                        <label class="col-md-2 control-label">平均月收入（元）</label>

                        <div class="col-md-3">
                            <g:textField class="form-control" name="contact.monthlyIncome"
                                         value="${this.opportunity?.contact?.monthlyIncome}"/>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    %{--职业信息--}%
        <div class="row">
            <div class="hpanel hyellow">
                <div class="panel-heading">
                    <div class="panel-tools">
                        <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                    </div>
                    职业信息
                </div>

                <div class="panel-body form-horizontal">
                    <div class="form-group">
                        <label class="col-md-2 control-label">现工作单位</label>

                        <div class="col-md-3">
                            <g:textField class="form-control" name="contact.companyName"
                                         value="${this.opportunity?.contact?.companyName}"/>
                        </div>
                        %{--<span class="cont">--}%
                        %{--<g:formatNumber number="${this.opportunity?.unitPrice}" type="number"--}%
                        %{--maxFractionDigits="2"--}%
                        %{--minFractionDigits="2" format="###,###.##"/>--}%
                        %{--元</span>--}%
                        <label class="col-md-2 control-label">工作单位地址</label>

                        <div class="col-md-3">
                            <span class="cont">
                                <g:textField class="form-control" name="contact.companyAddress"
                                             value="${this.opportunity?.contact?.companyAddress}"/>
                        </div></div>

                    <div class="form-group">
                        <label class="col-md-2 control-label">工作单位邮编</label>

                        <div class="col-md-3">
                            <g:textField class="form-control" name="contact.companyZipCode"
                                         value="${this.opportunity?.contact?.companyZipCode}"/>
                        </div>
                        <label class="col-md-2 control-label">工作单位电话</label>

                        <div class="col-md-3">
                            <g:textField class="form-control" name="contact.companyPhone"
                                         value="${this.opportunity?.contact?.companyPhone}"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-2 control-label">本单位行业</label>

                        <div class="col-md-3">
                            <g:select class="form-control" id="industry" name="contact.industry"
                                      from="${com.next.Industry.list()}"
                                      optionKey="id" optionValue="name"
                                      value="${this?.opportunity?.contact?.industry?.id}"
                                      noSelection="${['': '请选择']}"></g:select>

                        </div>
                        <label class="col-md-2 control-label">经济类型</label>

                        <div class="col-md-3">
                            <g:select class="form-control" id="companyEconomyType" name="contact.companyEconomyType"
                                      from="${com.next.AccountEconomyType.list()}" optionKey="id" optionValue="name"
                                      value="${this?.opportunity?.contact?.companyEconomyType?.id}"
                                      noSelection="${['': '请选择']}"></g:select>

                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-2 control-label">职业</label>

                        <div class="col-md-3">
                            <g:select class="form-control" name="contact.profession" id="profession"
                                      value="${this.opportunity?.contact?.profession?.id}" optionKey="id"
                                      optionValue="name" from="${com.next.ContactProfession.list()}"
                                      noSelection="${['': '请选择']}"/>
                        </div>
                        <label class="col-md-2 control-label">职称</label>

                        <div class="col-md-3">
                            <g:select class="form-control" name="contact.professionTile" id="contact.professionTile"
                                      value="${this.opportunity?.contact?.professionTile?.id}" optionKey="id"
                                      optionValue="name" from="${com.next.ContactProfessionTitle.list()}"
                                      noSelection="${['': '请选择']}"/>

                        </div>
                    </div>


                    <div class="form-group">
                        <label class="col-md-2 control-label">职务</label>

                        <div class="col-md-3">
                            <g:select class="form-control" name="contact.contactJob" id="contact.contactJob"
                                      value="${this.opportunity?.contact?.contactJob?.id}" optionKey="id"
                                      optionValue="name" from="${com.next.ContactJob.list()}"
                                      noSelection="${['': '请选择']}"/>
                        </div>
                        <label class="col-md-2 control-label">
                            参加工作时间</label>

                        <div class="col-md-3">
                            <g:textField class="form-control datapicker" name="contact.workTime"
                                         value="${this.opportunity?.contact?.workTime}"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">
                           现工作日期</label>

                        <div class="col-md-3">
                            <g:textField class="form-control datapicker" name="contact.currentWorkTime"
                                         value="${this.opportunity?.contact?.currentWorkTime}"/>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    %{--资产负债信息--}%
        <div class="row">
            <div class="hpanel hyellow">
                <div class="panel-heading">
                    <div class="panel-tools">
                        <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                    </div>
                    资产负债信息
                </div>

                <div class="panel-body form-horizontal">
                    <div class="form-group">

                        <label class="col-md-2 control-label">银行往来情况</label>

                        <div class="col-md-3 input-group">
                            <g:select class="form-control" id="bankDealings" name="contact.bankDealings"
                                      from="${com.next.Contact.constrainedProperties.bankDealings.inList}"
                                      value="${this.opportunity?.contact?.bankDealings}"
                                      noSelection="${['': '请选择']}"></g:select>
                        </div>
                        <label class="col-md-2 control-label">成为中行客户时间</label>

                        <div class="col-md-3">
                            <g:select class="form-control" id="beCustomerDuration" name="contact.beCustomerDuration"
                                      from="${com.next.Contact.constrainedProperties.beCustomerDuration.inList}"
                                      value="${this.opportunity?.contact?.beCustomerDuration}"
                                      noSelection="${['': '请选择']}"></g:select>
                        </div>
                    </div>

                    <div class="form-group">

                        <label class="col-md-2 control-label">主借款人月收入（元）</label>
                        %{--todo 跟上边的借款人信息联动--}%
                        <div class="col-md-3 input-group">
                            <g:textField class="form-control" name="contact?.monthlyIncome"
                                         value="${this.opportunity?.contact?.monthlyIncome}"/>
                        </div>
                        <label class="col-md-2 control-label">借款人月收入类型</label>

                        <div class="col-md-3 input-group">
                            <g:select class="form-control" id="monthlyIncomeType" name="contact.monthlyIncomeType"
                                      from="${com.next.Contact.constrainedProperties.monthlyIncomeType.inList}"
                                      value="${this.opportunity?.contact?.monthlyIncomeType}"
                                      noSelection="${['': '请选择']}"></g:select>
                        </div>
                    </div>


                    <div class="form-group">

                        <label class="col-md-2 control-label">借款人月收入验证方式</label>

                        <div class="col-md-3 input-group">
                            <g:select class="form-control" id="monthlyIncomeVerifyMethod"
                                      name="contact.monthlyIncomeVerifyMethod"
                                      from="${com.next.Contact.constrainedProperties.monthlyIncomeVerifyMethod.inList}"
                                      value="${this.opportunity?.contact?.monthlyIncomeVerifyMethod}"
                                      noSelection="${['': '请选择']}"></g:select>
                        </div>
                        <label class="col-md-2 control-label">家庭其他成员月收入</label>

                        <div class="col-md-3 input-group">
                            <g:textField class="form-control" name="contact?.otherMembersMonthlyIncome"
                                         value="${this.opportunity?.contact?.otherMembersMonthlyIncome}"/>
                        </div>
                    </div>

                    <div class="form-group">

                        <label class="col-md-2 control-label">家庭其他成员月收入验证方式</label>

                        <div class="col-md-3 input-group">
                            <g:select class="form-control" id="otherMembersMonthlyIncomeVerifyMethod"
                                      name="contact.otherMembersMonthlyIncomeVerifyMethod"
                                      from="${com.next.Contact.constrainedProperties.otherMembersMonthlyIncomeVerifyMethod.inList}"
                                      value="${this.opportunity?.contact?.otherMembersMonthlyIncomeVerifyMethod}"
                                      noSelection="${['': '请选择']}"></g:select>
                        </div>
                        <label class="col-md-2 control-label">现有住房种类</label>

                        <div class="col-md-3 input-group">
                            <g:select class="form-control" name="contact.houseType" id="houseType"
                                      value="${this.opportunity?.contact?.houseType?.id}" optionKey="id"
                                      optionValue="name" from="${com.next.HouseType.list()}"
                                      noSelection="${['': '请选择']}"/>
                        </div>
                    </div>

                    <div class="form-group">

                        <label class="col-md-2 control-label">房产套数</label>

                        <div class="col-md-3 input-group">
                            <g:textField class="form-control" name="contact.numberOfHouse"
                                         value="${this.opportunity?.contact?.numberOfHouse}"/>
                        </div>
                        <label class="col-md-2 control-label">房产总价值</label>

                        <div class="col-md-3 input-group">
                            <g:textField class="form-control" name="contact.totalPriceOfHouse"
                                         value="${this.opportunity?.contact?.totalPriceOfHouse}"/>
                        </div>
                    </div>
                    <div class="form-group">

                        <label class="col-md-2 control-label">持卡情况</label>

                        <div class="col-md-3 input-group">
                            <g:select class="form-control" id="cardCountRange" name="contact.cardCountRange"
                                      from="${com.next.Contact.constrainedProperties.cardCountRange.inList}"
                                      value="${this.opportunity?.contact?.cardCountRange}" noSelection="${['': '请选择']}"></g:select>
                        </div>
                        <label class="col-md-2 control-label">家庭成员数量</label>

                        <div class="col-md-3 input-group">
                            <g:textField class="form-control" name="contact?.familyMembersCount"
                                         value="${this.opportunity?.contact?.familyMembersCount}"/>
                        </div>
                    </div>
                    <div class="form-group">

                        <label class="col-md-2 control-label">供养人口数</label>

                        <div class="col-md-3 input-group">
                            <g:textField class="form-control" name="contact?.fendCount"
                                         value="${this.opportunity?.contact?.fendCount}"/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    %{--联系人信息--}%
        <div class="row">
            <div class="hpanel hyellow">
                <div class="panel-heading">
                    <div class="panel-tools">
                        <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                    </div>
                    联系人信息
                </div>

                <div class="panel-body form-horizontal">
                    <g:set var="opportunityContacts" value="${com.next.OpportunityContact.findAllByOpportunityAndType(this?.opportunity, com.next.OpportunityContactType.findByName('联系人'))}"></g:set>
                    <g:if test="${opportunityContacts&&opportunityContacts.size()>0}">
                        <g:each in="${opportunityContacts}" status="i" var="myVar">
                        <input type="hidden" name="linkContact${i}.id" value="${myVar?.contact?.id}">
                        <input type="hidden" name="linkContact${i}.opportunityContact.id" value="${myVar?.id}">
                        <div class="form-group">
                            <label class="col-md-2 control-label">联系人姓名</label>

                            <div class="col-md-3 input-group">
                                <g:textField class="form-control" name="linkContact${i}.fullName"
                                             value="${myVar?.contact?.fullName}"/>
                            </div>

                            <label class="col-md-2 control-label">与申请人关系</label>

                            <div class="col-md-3 input-group">
                                <g:select class="form-control" id="opportunityContactType1" name="linkContact${i}.connectedType"
                                          from="${com.next.OpportunityContactType.findAllByType('relation')}" optionKey="id"
                                          optionValue="name" noSelection="${['': '请选择']}" value="${myVar?.connectedType?.id}"></g:select>

                            </div>

                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">工作单位</label>

                            <div class="col-md-3 input-group">
                                <g:textField class="form-control" name="linkContact${i}.companyName"
                                             value="${myVar?.contact?.companyName}"/>
                            </div>

                            <label class="col-md-2 control-label">联系人手机</label>

                            <div class="col-md-3 input-group">
                                <g:textField class="form-control" name="linkContact${i}.cellphone"
                                             value="${myVar?.contact?.cellphone}"/>
                            </div>

                        </div>
                    </g:each>
                    </g:if>
                    <g:else>
                        <div class="form-group">
                            <label class="col-md-2 control-label">联系人姓名</label>

                            <div class="col-md-3 input-group">
                                <g:textField class="form-control" name="linkContact0.fullName"
                                             value=""/>
                            </div>

                            <label class="col-md-2 control-label">与申请人关系</label>

                            <div class="col-md-3 input-group">
                                <g:select class="form-control" id="opportunityContactType1" name="linkContact0.connectedType"
                                          from="${com.next.OpportunityContactType.findAllByType('relation')}" optionKey="id"
                                          optionValue="name" noSelection="${['': '请选择']}" value=""></g:select>

                            </div>

                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">工作单位</label>

                            <div class="col-md-3 input-group">
                                <g:textField class="form-control" name="linkContact0.companyName"
                                             value=""/>
                            </div>

                            <label class="col-md-2 control-label">联系人手机</label>

                            <div class="col-md-3 input-group">
                                <g:textField class="form-control" name="linkContact0.cellphone"
                                             value=""/>
                            </div>

                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">联系人姓名</label>

                            <div class="col-md-3 input-group">
                                <g:textField class="form-control" name="linkContact1.fullName"
                                             value=""/>
                            </div>

                            <label class="col-md-2 control-label">与申请人关系</label>

                            <div class="col-md-3 input-group">
                                <g:select class="form-control" id="opportunityContactType1" name="linkContact1.connectedType"
                                          from="${com.next.OpportunityContactType.findAllByType('relation')}" optionKey="id"
                                          optionValue="name" noSelection="${['': '请选择']}" value=""></g:select>

                            </div>

                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">工作单位</label>

                            <div class="col-md-3 input-group">
                                <g:textField class="form-control" name="linkContact1.companyName"
                                             value=""/>
                            </div>

                            <label class="col-md-2 control-label">联系人手机</label>

                            <div class="col-md-3 input-group">
                                <g:textField class="form-control" name="linkContact1.cellphone"
                                             value=""/>
                            </div>

                        </div>
                    </g:else>
                </div>

            </div>
        </div>
        <div class="form-group" style="margin-bottom: 50px;">
            <div class="col-md-3 col-md-offset-5">
                %{--<g:submitButton class="btn btn-info col-md-3"  name="update" value="保存"/>--}%
                <input type="button" class="btn btn-info" name="update" id='submit1' value="提交"/>
            </div>
        </div>
    </form>
    <form  method="PUT" id="myForm"  >
            <input type="hidden" name="id" value="${this?.opportunity?.id}">
        <g:if test="${this.opportunity?.product?.name=='汽车分期'}">
            <g:include controller="remoteSignFace" action="form1"></g:include>
        </g:if>
        <g:elseif test="${this.opportunity?.product?.name=='客群分期'}">
            <g:include controller="remoteSignFace" action="form2"></g:include>
        </g:elseif>
        <g:elseif test="${this.opportunity?.product?.name=='车位分期'}">
            <g:include controller="remoteSignFace" action="form3"></g:include>
        </g:elseif>
        <g:elseif test="${this.opportunity?.product?.name=='家装分期'}">
            <g:include controller="remoteSignFace" action="form4"></g:include>
        </g:elseif>
    </form>
    <g:include controller="remoteSignFace" action="questionnaireSurvey1/${this.opportunity?.id}"></g:include>
    <div class="form-group">
        <div class="col-md-3 col-md-offset-5">
            %{--<g:submitButton class="btn btn-info col-md-3"  name="update" value="保存"/>--}%
            <input type="button" class="btn btn-info" name="update" id='submit' value="保存"/>
        </div>
    </div>
</div>
<asset:javascript src="homer/vendor/jquery-ui/jquery-ui.min.js"/>
<asset:javascript src="homer/homer.js"/><asset:javascript src="homer/vendor/datetimepicker/bootstrap-datepicker.min.js"/>
<asset:javascript src="homer/vendor/datetimepicker/bootstrap-datepicker.zh-CN.min.js"/>

<script>
    $(function () {
        $('.hide-menu').click(function () {
            $('.fixed-navbar').toggleClass('hide-sidebar');
        });
        $('.datapicker').datepicker({
            minView: 4,
            language: "zh-CN",
            todayHighlight: true,
            format: 'yyyy-mm-dd 00:00:00.00',
            autoclose: true,
        });
        $("#numberOfAccount").blur(function()
        {
            var numberOfAccount = $("#numberOfAccount").val();
            if (numberOfAccount && numberOfAccount == 0)
            {
                $('#bankAccountInfo').removeClass("hide");
            }
            else
            {
                $('#bankAccountInfo').addClass("hide");
            }
        })

        $("#isIssuingCardImmediately").change(function () {
            var isIssuingCardImmediately = $(this).val().trim();
            if (isIssuingCardImmediately == "true")
            {
                $('#bankAccountInfo1').removeClass("hide");
            }
            else
            {
                $('#bankAccountInfo1').addClass("hide");
            }
        });

        $("#creditCardPaymentMethod").change(function () {
            var modeRepayment = $(this).val().trim();
            if (modeRepayment == "自动还款") {
                $('#provinceDiv').removeClass("hide");
            } else {
                $('#provinceDiv').addClass("hide");
            }
        });

        $("#purchaseSite").change(function () {
            var purchaseSite = $(this).val().trim();
            if (purchaseSite == "进口") {
                $('#importOddNumberDiv').removeClass("hide");
            } else {
                $('#importOddNumberDiv').addClass("hide");
            }
        });

        $("#postAddressType").change(function () {
            var postAddress
            var postAddressType = $("#postAddressType").val();
            if (postAddressType == '住宅地址') {
                postAddress = '${this?.opportunity?.contact?.residentialAddress}'
            }
            if (postAddressType == '单位地址') {
                postAddress = '${this?.opportunity?.contact?.companyAddress}'
            }
            $("#postAddress").val(postAddress);
        });

        $("#commissionRateTemp").blur(function () {
            var commissionRateTemp = $("#commissionRateTemp").val();
            var requestedAmount = $("#requestedAmount").val();
            if (requestedAmount && commissionRateTemp) {
                $("#commission").val(requestedAmount * commissionRateTemp / 100);
            }
        });

        $("#name").change(function () {
            var name = $("#name").val();
            if (name == '长城环球通爱驾汽车信用卡') {
                $('#code').val('6193');
            }
            if (name == '长城环球通爱家信用卡') {
                $('#code').val('6231');
            }
            if (name == '易分享自动分期白金信用卡') {
                $('#code').val('0113');
            }
        });

        $(".tab-info .title").click(function () {
            $(this).toggleClass('active').next(".weui-cells").fadeToggle(300);
        });

        $("#submit").click(function () {
            //
            var numberOfAccount = $("#numberOfAccount").val();
            if (!numberOfAccount) {
                helpMessage("请输入信用卡卡号");
                return;
            }

            // var postAddress = $("#postAddress").val();
            // if (!postAddress) {
            //     helpMessage("账单卡片寄送地址");
            //     return;
            // }

            // var code = $("#code").val();
            // if (!code) {
            //     helpMessage("请输入卡面代码");
            //     return;
            // }

            // var name = $("#name").val();
            // if (!name) {
            //     helpMessage("请输入卡面简称");
            //     return;
            // }
            //
            // var requestedAmount = $("#requestedAmount").val().trim();
            // if (!requestedAmount) {
            //     helpMessage("请输入分期额度");
            //     return;
            // }
            //
            // var loanDuration = $("#loanDuration").val();
            // if (!loanDuration) {
            //     helpMessage("请输入分期期数");
            //     return;
            // }
            // var commissionRateTemp = $("#commissionRateTemp").val();
            // if (!commissionRateTemp) {
            //     helpMessage("请输入手续费率");
            //     return;
            // }
            //
            // var vehicleBrand = $("#vehicleBrand").val()
            // if (!vehicleBrand) {
            //     helpMessage("请输入品牌");
            //     return;
            // }

            // $(".myForm").submit();
            // var l=$("#myForm").serialize()
            // alert(l)
            $.ajax({
                url: "/remoteSignFace/editOpportunitySave",
                type: "post",
                data:$("#myForm").serialize(),
                success: function (data) {
                    $.ajax({
                        url: "/remoteSignFace/questionnaireSurvey1Save",
                        type: "post",
                        data:$("#formTestSub").serialize(),
                        success: function (data) {
                            // $('#form5').html(data)

                        }
                    })
                }
            })

        })

        $("#submit1").click(function () {
            $.ajax({
                url: "/remoteSignFace/opportunitySave",
                type: "post",
                data:$("#myForm1").serialize(),
                success: function (data) {
                  alert("提交成功")
                    $("#form5").html(data)
                }
            })
        })

        function helpMessage(message) {
            /*$(".helpMsg").text(message).fadeIn(200);
            setTimeout(function () {
                $(".helpMsg").fadeOut(200);
            }, 2000);*/
            toastr.error(message)
        }
    })
</script>
%{--</body>
</html>--}%
